/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ui.gui.dialogs.settings;

import java.util.ArrayList;
import java.util.List;
import sun.util.calendar.Era;


    /**
 *
 * @author Leonhart
 */
public class GlobalSettings extends javax.swing.JPanel {

    private ArrayList<String> _PositionList = new ArrayList<String>();
    
    public GlobalSettings() {
        initComponents();
        _PositionList.add("North");
        _PositionList.add("Est");
        _PositionList.add("West");
        _PositionList.add("Center"); 
        LoadParameters();
    }
    private void LoadParameters()
    {
        try{
        String value = SaxParser.GetInstance().GetParametersAsString("AutoStartConsole");        
        _ConsolePosition.setSelected( "True".equals(value) ? true : false);
        value = SaxParser.GetInstance().GetParametersAsString("AutoStartAltExplorer");        
        _AltaricaExplorerPosition.setSelected( "True".equals(value) ? true : false);
        value = SaxParser.GetInstance().GetParametersAsString("AutoStartWorkspaceExplorer");        
        _WorkspacePosition.setSelected( "True".equals(value) ? true : false);
        }
        catch(Exception exception)
        {
            System.out.println("Error parameters: " + exception.getCause());
        }
    }
public ArrayList<XMLSettings> getParameters() {

    ArrayList<XMLSettings> SettingsL = new ArrayList<XMLSettings>();
    SettingsL.add(new XMLSettings("AutoStartConsole",_ConsolePosition.isSelected()? "True" : "False"));
    SettingsL.add(new XMLSettings("AutoStartAltExplorer", _AltaricaExplorerPosition.isSelected() ? "True" : "False"));
    SettingsL.add(new XMLSettings("AutoStartWorkspaceExplorer", _WorkspacePosition.isSelected() ? "True" : "False"));
    return SettingsL;
}
/**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
   
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        jPanel1 = new javax.swing.JPanel();
        _WorkspacePosition = new javax.swing.JCheckBox();
        _ConsolePosition = new javax.swing.JCheckBox();
        _AltaricaExplorerPosition = new javax.swing.JCheckBox();

        setLayout(new java.awt.BorderLayout());

        jPanel1.setLayout(new java.awt.GridBagLayout());

        _WorkspacePosition.setText("Auto Start WorkSpace Explorer");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 50);
        jPanel1.add(_WorkspacePosition, gridBagConstraints);

        _ConsolePosition.setText("Auto Start Console");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        jPanel1.add(_ConsolePosition, gridBagConstraints);

        _AltaricaExplorerPosition.setText("Auto Start Altarica Explorer");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 10, 50);
        jPanel1.add(_AltaricaExplorerPosition, gridBagConstraints);

        add(jPanel1, java.awt.BorderLayout.LINE_START);
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JCheckBox _AltaricaExplorerPosition;
    private javax.swing.JCheckBox _ConsolePosition;
    private javax.swing.JCheckBox _WorkspacePosition;
    private javax.swing.JPanel jPanel1;
    // End of variables declaration//GEN-END:variables
}
